package io.rehuo.modules.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.rehuo.modules.app.dao.UserRelationDao;
import io.rehuo.modules.app.entity.UserEntity;
import io.rehuo.modules.app.entity.UserRelationEntity;
import io.rehuo.modules.app.service.UserRelationService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shiguang
 * @date 2022年09月18日 0:31
 */
@Service("userRelationService")
public class UserRelationServiceImpl extends ServiceImpl<UserRelationDao, UserRelationEntity> implements UserRelationService {

    @Override
    public List<UserRelationEntity> getList(UserEntity userEntity) {
        return baseMapper.selectList(new QueryWrapper<UserRelationEntity>().eq("user_id",userEntity.getUserId()).orderByAsc("id"));
    }
}
